package com.siwei.mes.mapper.experiment;

import com.siwei.mes.common.base.BaseMapper;
import com.siwei.mes.entity.experiment.ExperimentSupplyTask;
import com.siwei.mes.entity.sync.tc.SupplyTask;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 试验台账与供货任务关系(ExperimentSupplyTask)表数据库访问层
 *
 * @author makejava
 * @since 2024-05-28 23:00:03
 */
public interface ExperimentSupplyTaskMapper extends BaseMapper<ExperimentSupplyTask> {
    /**
     * 获取所有
     *
     * @param entity
     * @return
     */
    List<ExperimentSupplyTask> getList(ExperimentSupplyTask entity);

    /**
     * 根据id获取
     *
     * @param id
     * @return
     */
    ExperimentSupplyTask loadById(@Param("id") Long id);

    List<SupplyTask> selectByExperimentId(@Param("experimentId") Long experimentId);

    /**
     * 根据试验委托id删除
     *
     * @param experimentId 试验委托id
     */
    void deleteByExperimentId(@Param("experimentId") Long experimentId);

    /**
     * 修改对应readTime为空的关联数据
     *
     * @param experimentId 试验委托id
     */
    void updateReadTimeIsNull(@Param("experimentId") Long experimentId);
}
